package com.huawei.hgip.paintgame.m.data;

import java.io.Serializable;

import android.os.Parcel;
import android.os.Parcelable;

public class Menu implements Serializable, Parcelable{
	
	private static final long serialVersionUID = 383932295054876015L;

	private int id;

	private String name;
	
	private String action;//activity action or apk url
	
	private String imgurl;
	
	private boolean isShow;//是否显示这个菜单
	
	private int clickTimes;
	
	public Menu() {
	}
	
	public Menu(String name, String action, String imgurl, boolean isShow) {
		this.name = name;
		this.action = action;
		this.imgurl = imgurl;
		this.isShow = isShow;
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public String getImgurl() {
		return imgurl;
	}

	public void setImgurl(String imgurl) {
		this.imgurl = imgurl;
	}

	public boolean isShow() {
		return isShow;
	}

	public void setShow(boolean isShow) {
		this.isShow = isShow;
	}

	public boolean isNeedUpdate() {
		if (action != null && action.contains("http")) {
			return true;
		}
		return false;
	}

	public int getClickTimes() {
		return clickTimes;
	}

	public void setClickTimes(int clickTimes) {
		this.clickTimes = clickTimes;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		
	}
	
}
